1. Operating Environment
   jre 1.6 or higher

2. Edit jpos.xml
        jpos.xml keeps the configuration information of scanner. Edit the configuration to match your device and application.  
        (1)Create a new configuration item using the following template: 
	<JposEntry logicalName="NLScanner">
		<creation factoryClass="com.jpos.scanner.ScannerSvcInstanceFactory" serviceClass="com.jpos.scanner.ScannerSvc"/>
		<vendor name="Scanner" url=""/>
		<jpos category="Scanner" version="1.14"/>
		<product description="Serial/USB Scanner" name="NLScanner" url=""/>
		
		<!--
			<prop name="port" value="HID"/>
		-->
		<!-- The interface of Scanner, "HID" is HID POS Mode -->
		<prop name="port" value="COM"/>
		<prop name="portno" value="1"/>
		<!--The type of Scanner, "3" is cmos Scanner-->
		<prop name="ScannerType" value="3"/>
		<!--Enable/disable the suffix codedefault=0, close the suffix code-->
		<prop name="Suffix" value="0"/>
	</JposEntry>

        Add the template above into JposEntry. Items to be editted: logicalName (product name), port, portno value (in the example above:"5" is COM5).

3. Operating Procedure
	(1)Run Postest.bat. Then the JavaPosttester window will pop up.
	(2)Select the "scanner" tab. Enter the "Logical name" consistent with that in jpos.xml, for instance, "NLScanner".
	(3)Execute the steps below:
		Open --> Claim  --> Read Data  --> Release --> Close

4. Open the Log Record
Modify the file log4j.properties.
Configure the root logger: Logger is responsible for processing most operations in log record(s).
Format: log4j.rootLogger = [ level ] , appenderName, appenderName, 
[level]: The hierarchy/level of log record. The levels include OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL or user-defined.
    Log4j recommends using only four levels (from high to low): ERROR, WARN, INFO and DEBUG. With the levels defined, you can control the opening and closing of the corresponding log records.
For instance, if you have defined the INFO level, only the log records assigned with the INFO level or higher level(s) are allowed to be processed. So the log record(s) with the DEBUG level will not be printed.
[level]=All: Print all log records.
[level]=OFF: Disable the output of all log records.
appenderName: The output destination of log records. It is allowed to specify multiple output destinations.

For more information, refer to the instructions of java log4j.
